package net.lab1024.sa.admin.module.system.user.domain;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import net.lab1024.sa.base.common.enumeration.GenderEnum;
import net.lab1024.sa.base.common.json.deserializer.FileKeyVoDeserializer;
import net.lab1024.sa.base.common.json.serializer.FileKeyVoSerializer;
import net.lab1024.sa.base.common.swagger.SchemaEnum;

/**
 * 请求员工登录信息
 *
 * @Author 1024创新实验室: 善逸
 * @Date 2021/8/4 21:15
 
 
  * @Copyright  cpedu
 */
@Data
public class RequestUser implements net.lab1024.sa.admin.module.system.user.domain.RequestUsers {

    @Schema(description = "用户id")
    private String userId;

    @Schema(description = "用户类型")
    private Long userType;

    @Schema(description = "用户昵称")
    private String petName;

    @Schema(description = "用户名称")
    private String name;

    @SchemaEnum(GenderEnum.class)
    private Integer gender;

    @Schema(description = "手机号码")
    private String phone;

    @Schema(description = "学校id")
    private Long schoolId;

    @Schema(description = "学校名称")
    private String schoolName;

    @Schema(description = "用户头像")
    @JsonSerialize(using = FileKeyVoSerializer.class)
    @JsonDeserialize(using = FileKeyVoDeserializer.class)
    private String picture;
//    @Schema(description = "是否为接单员")
//    private Boolean administratorFlag;

    @Schema(description = "请求ip")
    private String ip;

    @Schema(description = "请求user-agent")
    private String userAgent;

    @Override
    public String getUserId() {
        return userId;
    }

    @Override
    public String getUserName() {
        return name;
    }
}
